#include <cstdio>
#include <cmath>
#include <algorithm>

using namespace std;

int n, m, v;
double x[ 51 ], y[ 51 ], g[ 51 ][ 51 ], mid;
int dp[ 51 ], stk[ 51 ][ 51 ], mx, cnt;
double sf[ 51 * 51 ];

int dfs( int n, int ns, int dep )
{
    if ( 0 == ns )
    {
        if ( dep > mx ) mx = dep;
        return 1;
    }
    int i, j, k, p, cnt;
    for ( i = 0; i < ns; i++ )
    {
        k = stk[ dep ][ i ]; cnt = 0;
        if ( dep + n - k <= mx ) return 0;
        if ( dep + dp[ k ] <= mx ) return 0;
        for ( j = i + 1; j < ns; j++ )
        {
            p = stk[ dep ][ j ];
            if ( g[ k ][ p ] >= mid || fabs( g[ k ][ p ] - mid ) <= 1e-8 ) stk[ dep + 1 ][ cnt++ ] = p;
        }
        dfs( n, cnt, dep + 1 );
    }
    return 1;
}

int clique( int n )
{
    int i, j, ns;
    for ( mx = 0, i = n - 1; i >= 0; i-- )
    {
        for ( ns = 0, j = i + 1; j < n; j++ )
            if ( g[ i ][ j ] >= mid || fabs( g[ i ][ j ] - mid ) <= 1e-8 ) stk[ 1 ][ ns++ ] = j;
        dfs( n, ns, 1 ); dp[ i ] = mx;
    }
    return mx;
}

void init( )
{
    int i, j;
    v = 0;
    for ( i = 0; i < n; i++ )
        scanf("%lf%lf", &x[ i ], &y[ i ]);
    for ( i = 0; i < n; i++ )
        for ( j = 0; j < n; j++ )
        {
            g[ i ][ j ] = sqrt( ( x[ i ] - x[ j ] ) * ( x[ i ] - x[ j ] ) + ( y[ i ] - y[ j ] ) * ( y[ i ] - y[ j ] ) );
            sf[ i * n + j ] = g[ i ][ j ];
        }
    sort( sf, sf + n * n );
    cnt = n * n;
    for ( i = 1; i < cnt; i++ )
    {
        if ( sf[ i ] == sf[ i - 1 ] )
        {
            for ( j = i; j < cnt - 1; j++ )
                sf[ j ] = sf[ j + 1 ];
            cnt--;
            i--;
        }
    }
}

void work( )
{
    int left = 0, right = cnt - 1, mm, ret;
    while ( left <= right )
    {
        mm = ( left + right ) / 2;
        mid = sf[ mm ];
        if ( clique( n ) >= m )
        {
            ret = mm;
            left = mm + 1;
        }
        else
            right = mm - 1;
    }
    printf("%.2lf\n", sf[ ret ]);
}

int main( )
{
    while ( scanf("%d%d", &n, &m) != EOF )
    {
        init( );
        work( );
    }
    return 0;
}
